package decorator;

/**
 * @author ycc
 * @date 2024/4/2
 * 创建一个抽象的装饰者类CondimentDecorator，它也实现了Beverage接口，并包含一个Beverage类型的成员变量
 */
public abstract class CondimentDecorator implements Beverage {
    protected Beverage beverage;

    public CondimentDecorator(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public double cost() {
        return beverage.cost();
    }
}
